package com.test.nnooolwdeaer.util_wooden.event

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper

class TrackDatabase_wooden(context: Context) : SQLiteOpenHelper(context, "woodenloan_track_events.db", null, 1) {
    override fun onCreate(db: SQLiteDatabase) {
        db.execSQL("""
            CREATE TABLE track_event (
                id INTEGER PRIMARY KEY AUTOINCREMENT,
                type TEXT NOT NULL,
                remark TEXT NOT NULL,
                createTime INTEGER NOT NULL,
                isUpload INTEGER NOT NULL
            )
        """.trimIndent())
    }

    override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
        db.execSQL("DROP TABLE IF EXISTS track_event")
        onCreate(db)
    }
}

